package org.porridge;

import java.util.Timer;



import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.porridge.timer.BookTask;

public class Server {
	
	private static Timer timer=null;
	
	static Log log = LogFactory.getLog(Server.class.getClass());
	
	public static void main(String[] args) {
		startTime();
	}
	
	public static void startTime(){
		log.info("time start .....");
		timer = new Timer(false);
		//二个小时执行一次
		//启动后一个小时时执行第一次
		timer.schedule(new BookTask(), 0,1000*60*60*2);
	}
	
}
